package com.tianji.learning.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tianji.learning.domain.po.PointsRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 学习积分记录，每个月底清零 Mapper 接口
 * </p>
 *
 * @author Yandel
 * @since 2025-05-26
 */
public interface PointsRecordMapper extends BaseMapper<PointsRecord> {

    @Select("SELECT sum(points) FROM points_record ${ew.customSqlSegment}")
    Integer queryUserPointsByTypeAndDate(QueryWrapper<PointsRecord> wrapper);
}
